Initial Values

You can assign initial values to channels and/or parameters at different places:

When the same channel or parameter is used at these places with different initial values, the following hierarchy applies: Init Values mapping flavor > Initial Values view > Declaration Editor. For example, if a channel or parameter value is set to 3 in the Initial Values view but to 1 in the Declaration Editor, the value in the Initial Values view prevails.

To show the applied initial values in the test report, use the Report Signal Table assesslet, see Assesslets - Report Signal Table.
For the ASCET Platform, initial values work only with primitive channels (double, float, int, boolean).

Initial values (default values) assigned in the Declaration Editor

Each channel and each parameter has a default value that can be changed in the Declaration Editor. The default value acts as initial value as long as you do not define a specific initial value. To edit the default value, select a signal in the Declaration Editor, go to the General tab and enter the new value in the Value field. Multiple selection is possible.

Default value set in the Declaration Editor

Initial values assigned in the Initial Values view

The Initial Values view is used to assign initial values to channels and/or parameters. Initial value can be specified for the following elements.

Element Description
variant The initial values are only valid for this variant.
variant folder Variants in this folder take over the initial values set here except a variant where initial values are already specified. They keep them.
test case The initial values are only valid for this test case.
test case folder Test cases in that folder take over the initial values set here except a test case where initial values are already specified. They keep them.
Setting an initial value to a variant, a variant folder, a test case or a test case folder is identical.

Select a test case in the Project view. Go to the Initial Values view and click Add one initial values definition row. Press Ctrl+Space to use the autocompletion feature and select a channel or parameter. Click in the value field and enter the new value, or use the three dots button "..." to the right to open the Value Editor, see Value Editor.

Add a new row and use the autocompletion feature for channel or parameter selection

Or, click Select and select all channels and parameters whose initial values you want to change.

Open the 'Assign channels/parameters' dialog for channel or parameter selection

You can also assign values to struct or array elements.

For arrays only a number can be used as index.

Struct or array element values can be set

Instead of entering initial value definitions manually, you can use the environment variable ${tpt.scenario.attribute.<attribute_name>} to enter the value of a Test Case Details view attribute. The Test Case Details view attribute value can be different from test case to test case, see Test Case Details - Edit Test Case Attributes.

Accessing test case attribute values in the Initial Values view

To copy and paste individual initial values, select the initial value definitions in the Initial Values view and press Ctrl+C to copy them. Select another test case or test cases folder in the Project view, select the Initial Values view again and press Ctrl+V to insert the copied initial values. When using the Import signal step, you can copy the first value of a signal from an external file as initial value to a signal in TPT for a test case, see Copy to initial values.

Initial values assigned in the Init Values mapping flavor

The Init Values mapping flavor is used to specify initial values of signals. The mapping is created and specified in the Declaration Editor, see Mapping Flavor - Init Values. Other than the default values of a signal, these initial values are only applied during the test execution when the mapping is selected in the test platform.

When using the FUSION Platform, the current values of the SUT inputs are queried before test execution. This makes sense if a system under test is running when TPT connects to it, because switches could already be on or accelerator pedals pressed, see FUSION Platform - Configuration.

The values specified prevail all other initial value specifications except for the values that act as initial values in the test specification in the Content view.

Init Values mapping in the 'Declaration Editor'

Mapping selected in the Platform Configuration dialog

Initial values assigned in a step list

Values that are specified at the beginning of a step list, act as initial values.

This kind of initial value prevails the default value set in the Declaration Editor, the initial value specified in the Initial Values view and the initial value specified in the Init Value mapping flavor.

Your initial values specification must end with a Wait step, see Step Type - Wait.

Signal values that will act as initial values